/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package gace.logica;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 *
 * @author german
 */
public class DateUtils {

    public static String now(String dateFormat) {
        Calendar cal = Calendar.getInstance();
        SimpleDateFormat sdf = new SimpleDateFormat(dateFormat);
        return sdf.format(cal.getTime());
    }

    public static void main(String[] args){
        DateUtils date = new DateUtils();
        String now = DateUtils.now("yyyy-MM-dd");
        System.out.println(now);
    }

}
